<?php
/**
 * Created by PhpStorm.
 * User: czm
 * Date: 2019/4/24
 * Time: 10:14
 */
namespace app\admin\controller;

use think\Controller;
use think\Session;

class Base extends Controller
{
    public function _initialize(){
        if(!session('name')){
//            $this->error('请先登录系统',url('/admin/login'));
            $this->redirect('/admin/login');
        }

        //parent::_initialize();
//        $admin=db('admin')->where('id',Session::get('id'))->field('id')->find();
//        if($admin){
//            $this->assign('hid',$admin['id']);
//        }else{
//            $this->redirect('/admin/login');
//        }
    }

}